package edu.rpi.cs.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class passwordWindow extends Activity {
	
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
  		setContentView(R.layout.password);
  		
       final Button ok_button = (Button)findViewById(R.id.enter_password);

      ok_button.setOnClickListener(new View.OnClickListener() {
      	public void onClick(View view) {   
      		EditText pw = (EditText) findViewById(R.id.password_field);
       		String entered = pw.getText().toString();
      		if(entered!="foo")
            {
         	
          		Intent k = new Intent(passwordWindow.this, mainWindow.class);         
              	startActivity(k);

    		}  }   
      });


    }

	
}
